A public land mobile network (PLMN) is a network that is established and operated to provide a land mobile communications service for the public. To improve network communication efficiency and satisfy different communications service requirements, the PLMN may be divided into a plurality of network slices, and each network slice provides a corresponding network service.
One PLMN may include a plurality of network slices. A plurality of network function (NF) instances may be deployed in each network slice, and each NF instance may provide one type of network service for a user. When providing a cross-PLMN roaming service for a user (for example, a terminal device of a server provided by a Chinese operator is located in a foreign country), an NF instance in a PLMN may need to access a to-be-accessed NF instance in another PLMN. In other approaches, an NF instance in a PLMN can access an NF instance in another PLMN only based on an NF type of the to-be-accessed NF instance. However, when a network slice type to which the to-be-accessed NF instance belongs is different from a network slice type to which the NF instance belongs, the to-be-accessed NF instance may not include a network function, data, or the like needed by the NF instance. Consequently, the NF instance cannot access a correct to-be-accessed NF instance, resulting in relatively poor access reliability of NF instances between different PLMNs.